package com.zm.xiaohashu.user.biz.enums;

import com.zm.exception.BaseExceptionInterface;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ResponseCodeEnum implements BaseExceptionInterface {

    // ----------- 通用异常状态码 -----------
    SYSTEM_ERROR("USER-10000", "出错啦，后台小哥正在努力修复中..."),
    PARAM_NOT_VALID("USER-10001", "参数错误"),

    // ----------- 业务异常状态码 -----------
    VERIFICATION_CODE_ERROR("USER-20001", "验证码错误"),
    /*手机号格式错误*/
    PHONE_NOT_VALID("USER-20002", "手机号格式错误"),
    /*验证码不能为空*/
    VERIFICATION_CODE_NOT_NULL("USER-20003", "验证码不能为空"),
    /*密码不能为空*/
    PASSWORD_NOT_NULL("USER-20004", "密码不能为空"),
    /*注册失败*/
    REGISTER_FAIL("USER-20005", "注册失败"),
    /*修改密码失败*/
    UPDATE_PASSWORD_FAIL("USER-20006", "修改密码失败"),
    /*该用户不存在*/
    USER_NOT_EXIST("USER-20007", "该用户不存在"),
    /*手机号或密码错误*/
    PHONE_OR_PASSWORD_ERROR("USER-20008", "手机号或密码错误"),
    NICK_NAME_VALID_FAIL("USER-20009", "昵称格式错误"),
    XIAOHASHU_ID_VALID_FAIL("USER-20010", "小哈书号请设置6-15个字符，仅可使用英文（必须）、数字、下划线"),
    SEX_VALID_FAIL("USER-20011", "性别格式错误"),
    INTRODUCTION_VALID_FAIL("USER-20012", "简介格式错误"),
    UPLOAD_AVATAR_FAIL("USER-20013", "上传头像失败"),
    UPLOAD_BACKGROUND_IMG_FAIL("USER-20014", "上传背景图失败"),
    ;

    // 异常码
    private final String errorCode;
    // 错误信息
    private final String errorMessage;

}
